home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / amiga / asrc29k.lha / enet.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-08  |  1.1 KB  |  44 lines

  1. /* Generic Ethernet constants and templates */
  2.  
  3. #ifndef    EADDR_LEN
  4.  
  5. #include "global.h"
  6.  
  7. #define    EADDR_LEN    6
  8. /* Format of an Ethernet header */
  9. struct ether {
  10.     char dest[EADDR_LEN];
  11.     char source[EADDR_LEN];
  12.     int16 type;
  13. };
  14. #define    ETHERLEN    14
  15.  
  16. /* Ethernet broadcast address */
  17. extern char Ether_bdcst[];
  18.  
  19. /* Ethernet type fields */
  20. #define    IP_TYPE        0x800    /* Type field for IP */
  21. #define    ARP_TYPE    0x806    /* Type field for ARP */
  22.  
  23. #define    RUNT        60    /* smallest legal size packet, no fcs */
  24. #define    GIANT        1514    /* largest legal size packet, no fcs */
  25.  
  26. #define    MAXTRIES    16    /* Maximum number of transmission attempts */
  27.  
  28. /* In file enet.c: */
  29. char *pether __ARGS((char *out,char *addr));
  30. int gether __ARGS((char *out,char *cp));
  31. int enet_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  32.     int del,int tput,int rel));
  33. int enet_output __ARGS((struct iface *iface,char dest[],char source[],int16 type,
  34.     struct mbuf *data));
  35. void eproc __ARGS((struct iface *iface,struct mbuf *bp));
  36.  
  37. /* In enethdr.c: */
  38. struct mbuf *htonether __ARGS((struct ether *ether,struct mbuf *data));
  39. int ntohether __ARGS((struct ether *ether,struct mbuf **bpp));
  40.  
  41. #endif    /* EADDR_LEN */
  42.  
  43.  
  44.